package com.xjscrm.server.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjscrm.common.entity.GroupPullMarketing;
import com.xjscrm.server.dto.grouppullmarketing.GroupPullMarketingQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public interface GroupPullMarketingMapper {
    int deleteById(@Param("id") Long id);

    int insert(GroupPullMarketing record);

    int insertSelective(GroupPullMarketing record);

    GroupPullMarketing selectById(@Param("id") Long id);

    List<GroupPullMarketing> findByDeviceUniqueIdAndWxid(@Param("deviceUniqueId") Long deviceUniqueId, @Param("wxid") String wxid, @Param("groupWxid") String groupWxid);

    int updateByIdSelective(GroupPullMarketing record);

    int updateById(GroupPullMarketing record);

    /**
     * 分页查询
     *
     * @param page
     * @param query
     * @return
     */
    ArrayList<GroupPullMarketing> findByList(Page<GroupPullMarketing> page, @Param("query") GroupPullMarketingQuery query);
}